package com.designpatterns.command.command.light;

import com.designpatterns.command.command.Command;
import com.designpatterns.command.entity.Light;

/**
 * @author Brook
 */
public class LightOffCommand implements Command {
    Light light;

    public LightOffCommand(Light light){
        this.light = light;
    }

    @Override
    public void excute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
